<extend name="public:base" />
<block name="breadcrumb">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-book"></i>
            <a href="index">{:L('系统管理')}</a>
        </li>
        <li class="active">{:L('权限管理')}</li>
    </ul>
</block>
<block name="c-block">
    <div class="main-content">
            <!-- #section:settings.box -->

            <!-- /.ace-settings-container -->

            <!-- /section:settings.box -->
            <div class="page-content-area">

                <div class="page-header">
                    <h1>
                        权限管理            <small>
                        <i class="ace-icon fa fa-angle-double-right"></i>
                        用户组            </small>
                        <ul class="nav navbar-nav navbar-right">
                            <button class="btn btn-sm btn-primary" onclick="openDialog('{:U('groupAdd')}', '新增组');">
                                <i class="fa fa-plus"></i> 新增组 </button>
                        </ul>
                    </h1>

                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->

                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>标题</th>
                                    <th>状态</th>
                                    <th class="text-right">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="lists" id="vo">
                                    <tr id="id_{$vo['group_id']}">
                                        <td>{$vo['group_id']}</td>
                                        <td>{$vo.title}</td>
                                        <td >
                                            <label>
                                                <input name="" value="1" <?php if($vo['status'] == 1){echo "checked";}?> class="ace ace-switch ace-switch-3 ajax-switch" type="checkbox" data-action="{:U('groupState',['group_id'=>$vo['group_id']])}" >
                                                <span class="lbl"></span>
                                            </label>
                                        </td>

                                        <td class="text-right">
                                            <a class="btn btn-xs btn-warning" href="{:U('groupAccess',array('group_id'=>$vo['group_id']))}">
                                                <i class="ace-icon fa fa-cogs bigger-120"></i> 分配权限
                                            </a>
                                            <if if condition="$vo['group_id'] neq 1">
                                                <button class="btn btn-xs btn-info" onclick="openDialog('{:U('groupEdit',array('id'=>$vo['group_id']))}', '修改数据');">
                                                    <i class="ace-icon fa fa-pencil bigger-120"></i>
                                                </button>
                                                <button class="btn btn-xs btn-danger delete confirm" data-rel="确定删除吗？" data-action="{:U('groupDel',array('id'=>$vo['group_id']))}">
                                                    <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                                </button>
                                            </if>
                                        </td>
                                    </tr>
                                </volist>
                                <tr>
                                    <td colspan="7">
                                        <ul class="pagination">
                                        </ul>
                                    </td>
                                </tr>
                            </tbody>
                        </table>


                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content-area -->
    </div>
</block>
